package cn.ibdsr.human.constant;

/**
 * @description:
 * @author: cdl
 * @email: iamcimon@qq.com
 * @date: 2021/8/4 13:32
 */
public enum PublishEnum {
    NO(0, "未发布"),
    YES(1, "已发布");

    int code;
    String message;

    private PublishEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static PublishEnum valueOf(int status) {
        for (PublishEnum s : PublishEnum.values()) {
            if (s.getCode() == status) {
                return s;
            }
        }
        return null;
    }
}
